In the current data transmission systems, a speech coding technology may compress the transmission bandwidth of speech signals and increase the capacity of communications systems. Only about 40% of the contents in a speech communication include speech signal, and the rest of the contents that are transmitted are all silences or background noises. In order to further save the transmission bandwidth, Discontinuous Transmission System (DXT)/Comfortable Noise Generation (CNG) technologies are provided.
In the related art, one DXT strategy is to transmit a Silence Insertion Descriptor (SID) frame every several frames at a fixed interval. The CNG algorithm used in the DXT strategy utilizes parameters (including an energy parameter and a spectrum parameter) decoded from two received successive SID frames to perform linear interpolation, so as to estimate parameters required for synthesizing comfortable noises.
After the energy parameter and the spectrum parameter are reconstructed, the spectrum parameter is used for calculation of a synthesis filter and the energy parameter is used as the energy of an excitation signal. After the excitation signal is calculated, the synthesis filter performs filtering and outputs the reconstructed comfortable noises.
In the above solution, when the energy parameter is quantified at an encoding end, an attenuation of 3 dB is added so that the energy of the comfortable noise reconstructed according to the CNG algorithm at a decoding end is lower than an actual value. In a background noise stage, even if the energy of the actual background noise is relatively high, the generated comfortable noise may provide a relatively better subjective feeling for listeners.
However, the energy attenuation of 3 dB is added in a fixed manner, i.e., the same attenuation is applied to all of the background noises in the noise stage. Thus, when a speech stage is switched to the noise stage (or the noise stage is switched to the speech stage), the energy of background noises in a speech frame is high, while the energy of the comfortable noise reconstructed in the noise stage is low. The discontinuity of the energy can be recognized by the listeners clearly, which also affects the subjective feeling of the listeners brought by the reconstructed comfortable noise.